package DomainLayer;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;

import Annotations.AttributeNameAnnotation;

public abstract class BaseMovieEntity extends AbstractEntity implements
		ICommentable, IRatingSupportable {
	@AttributeNameAnnotation(Name = "Description", isAggregator = false)
	protected String movieDescription;

	@AttributeNameAnnotation(Name = "IMDBRating", isAggregator = false)
	protected double ratingIMDB;

	@AttributeNameAnnotation(Name = "MPAA", isAggregator = false)
	protected MPAARatingStatus ratingMPAA;

	@AttributeNameAnnotation(Name = "VotesRating", isAggregator = false)
	protected int rating;

	@AttributeNameAnnotation(Name = "Name", isAggregator = false)
	protected String name;

	@AttributeNameAnnotation(Name = "Genres", isAggregator = false, collectionTypeInDB = "genre_id_list", genericParam = "java.lang.String")
	protected HashSet<String> genre;

	@AttributeNameAnnotation(Name = "Cover", isAggregator = false)
	protected String cover;

	@AttributeNameAnnotation(Name = "Profit", isAggregator = true)
	protected ProfitValueObject profit;

	@AttributeNameAnnotation(Name = "Actors", isAggregator = false, collectionTypeInDB = "actor_list", genericParam = "java.lang.String")
	protected ArrayList<String> actors;

    public ArrayList<String> getActors() {
		return actors;
	}

	public void setActors(ArrayList<String> actors) {
		this.actors = actors;
	}

	public String getCover() {
		return cover;
	}

	public void setCover(String cover) {
		this.cover = cover;
	}

	public MPAARatingStatus getRatingMPAA() {
		return ratingMPAA;
	}

	public void setRatingMPAA(MPAARatingStatus ratingMPAA) {
		this.ratingMPAA = ratingMPAA;
	}

	public void addGenre(String genre) {
		this.genre.add(genre);
	}

	public void removeGenre(String genre) {
		this.genre.remove(genre);
	}

	public HashSet<String> getGenre() {
		return genre;
	}

	public void setGenre(HashSet<String> genre) {
		this.genre = genre;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMovieDescription() {
		return movieDescription;
	}

	public void setMovieDescription(String movieDescription) {
		this.movieDescription = movieDescription;
	}

	public double getRatingIMDB() {
		return ratingIMDB;
	}

	public void setRatingIMDB(double ratingIMDB) {
		this.ratingIMDB = ratingIMDB;
	}

	public int getRating() {
		return rating;
	}

	public void setRating(int rating) {
		this.rating = rating;
	}

	public ProfitValueObject getProfit() {
		return profit;
	}

	public void setProfit(ProfitValueObject profit) {
		this.profit = profit;
	}

	public BaseMovieEntity(String movieDescription, double ratingIMDB,
			MPAARatingStatus ratingMPAA, int rating, String name,
			HashSet<String> genre, String cover, ProfitValueObject profit,
			ArrayList<String> actors) {
		super();
		this.movieDescription = movieDescription;
		this.ratingIMDB = ratingIMDB;
		this.ratingMPAA = ratingMPAA;
		this.rating = rating;
		this.name = name;
		this.genre = genre;
		this.cover = cover;
		this.profit = profit;
		this.actors = actors;
	}

	public BaseMovieEntity(){}

}

